package com.headingdata.d5_enum;
//拓展：抽象枚舉
public enum B {
    X(){
        @Override
        public void go(){

        }
    },
    Y("张三"){
        @Override
        public void go() {
            System.out.println(this.getName());
        }
    };
    private String name;

    B() {
    }

    B(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public abstract void go();
}
